package com.hdhere.application.controller;

import com.hdhere.application.service.VideoCategoryService;
import com.hdhere.application.service.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * Created by dus on 2019/1/3.
 */
@Controller
@RequestMapping("/video")
public class VideoController {

    @Autowired
    private VideoService videoService;

    @Autowired
    private VideoCategoryService videoCategoryService;

    @GetMapping("/list")
    public String videoList(Map<String, Object> map){
        var cate = videoCategoryService.getByParentId(0L);
        map.put("cates", cate);

        return "videoList";
    }

    @GetMapping("/info")
    public String videoInfo(){
        return "videoInfo";
    }
}
